package com.time.sky.mapper;

import com.time.sky.entity.XHJF;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface XHJFMapper {
    @Select("SELECT * FROM XHJF x left join dcjf d on x.xid=d.did")
    List<XHJF> selectAll();
    @Select("SELECT * FROM XHJF ")
    List<XHJF> selectList();
    @Insert("insert into XHJF(wyf,gnf,cdzj,cwzj,fwzj,cwglf,wsf,dtf,dsf) " +
            "values(#{wyf},#{gnf},#{cdzj},#{cwzj},#{fwzj},#{cwglf},#{wsf},#{dtf},#{dsf})")
    void add(XHJF xhjf);
    @Delete("delete from XHJF where xid=#{xid}")
    void delete(int xid);
    @Select("SELECT * FROM XHJF  where xid=#{xid}")
    XHJF getById(int xid);
    @Update("update XHJF set wyf=#{wyf},gnf=#{gnf},cdzj=#{cdzj},cwzj=#{cwzj},fwzj=#{fwzj},cwglf=#{cwglf},wsf=#{wsf},dtf=#{dtf},dsf=#{dsf} where xid=#{xid}")
    void update(XHJF xhjf);
}
